package com.easy.tool.entity;

import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * @author 高俊
 * @create 2021-09-2021/9/7-17:31
 */
@Data
public class BasePageEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotNull(message = "当前页面不能为空")
    @Min(message = "当前页面不能小于1",value = 1)
    private Integer current =1;

    @NotNull(message = "页面大小不能为空")
    @Min(message = "页面大小不能小于1",value = 1)
    private Integer size = 10;

    /**
     * 主键ID
     */
    //@TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * create_user
     */
    //@TableField(value="create_user")
    private Long createUser;

    /**
     * create_time
     */
    //@TableField(value="create_time")
    private Date createTime;

    /**
     * update_user
     */
    //@TableField(value="update_user")
    private Long updateUser;

    /**
     * update_time
     */
    //@TableField(value="update_time")
    private Date updateTime;

    /**
     * delete_user
     */
    //@TableField(value="delete_user")
    private Long deleteUser;

    /**
     * delete_time
     */
    //@TableField(value="delete_time")
    private Date deleteTime;

    /**
     * 删除标志1：正常；0：删除
     */
    //@TableField(value="delete_flag")
    private int deleteFlag = 0;

    /**
     * 状态：根据具体情况而定。默认：0
     */
    //@TableField(value="status")
    private int status = 0;
    /**
     * 是否启用：默认：1
     */
    private int enable = 1;
}
